<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册页面</title>
    <style>
        /* 保持与登录页面一致的基色 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', sans-serif;
        }

        body {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
        }

        .signup-container {
            background: rgba(255, 255, 255, 0.95);
            padding: 40px;
            border-radius: 20px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
            width: 100%;
            max-width: 450px;
            transition: transform 0.3s ease;
        }

        .signup-container:hover {
            transform: translateY(-5px);
        }

        .signup-header {
            text-align: center;
            margin-bottom: 30px;
        }

        .signup-header h1 {
            color: #2d3436;
            font-size: 2.2em;
            margin-bottom: 10px;
        }

        .input-group {
            margin-bottom: 20px;
            position: relative;
        }

        .input-group input {
            width: 100%;
            padding: 15px 40px 15px 15px;
            border: none;
            background: #f5f6fa;
            border-radius: 10px;
            font-size: 16px;
            transition: all 0.3s ease;
        }

        .password-toggle {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            cursor: pointer;
            color: #7f8fa6;
        }

        .input-group input:focus {
            outline: none;
            background: #fff;
            box-shadow: 0 0 10px rgba(78, 205, 196, 0.2);
        }

        .password-strength {
            height: 4px;
            background: #eee;
            border-radius: 2px;
            margin-top: 8px;
            overflow: hidden;
        }

        .strength-bar {
            height: 100%;
            width: 0;
            transition: width 0.3s ease;
        }

        .terms {
            margin: 20px 0;
            font-size: 0.9em;
        }

        .terms a {
            color: #4ecdc4;
            text-decoration: none;
        }

        .signup-button {
            width: 100%;
            padding: 15px;
            background: #4ecdc4;
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 16px;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        .signup-button:hover {
            background: #45b7b0;
        }

        .login-link {
            text-align: center;
            margin-top: 25px;
        }

        .login-link a {
            color: #4ecdc4;
            text-decoration: none;
            font-weight: 600;
        }

        @media (max-width: 480px) {
            .signup-container {
                margin: 20px;
                padding: 25px;
            }
        }
    </style>
</head>
<body>
    <div class="signup-container">
        <div class="signup-header">
            <h1>创建账户</h1>
            <p>开启您的专属体验</p>
        </div>
        <form>
            <div class="input-group">
                <input type="text" placeholder="用户名" required>
            </div>
            
            <div class="input-group">
                <input type="email" placeholder="电子邮箱" required>
            </div>

            <div class="input-group">
                <input type="password" placeholder="密码" id="password" required>
                <span class="password-toggle" onclick="togglePassword()">👁️</span>
                <div class="password-strength">
                    <div class="strength-bar" id="strength-bar"></div>
                </div>
            </div>

            <div class="input-group">
                <input type="password" placeholder="确认密码" required>
            </div>

            <div class="terms">
                <label>
                    <input type="checkbox" required>
                    我同意 <a href="/aaaaa">服务条款</a> 和 <a href="/#">隐私政策</a>
                </label>
            </div>

            <button type="submit" class="signup-button">立即注册</button>
            <div class="login-link">
                已有账户？ <a href="/login.html">立即登录</a>
            </div>
        </form>
    </div>
    <!-- 在<body>结束前添加优化脚本 -->
    <script>
        // 引入FastClick库消除移动端延迟
        document.addEventListener('DOMContentLoaded', function() {
            if ('addEventListener' in document) {
                document.addEventListener('DOMContentLoaded', function() {
                    FastClick.attach(document.body);
                }, false);
            }
        });
    
        // 优化密码切换点击
        document.querySelector('.password-toggle').addEventListener('touchstart', function(e) {
            e.preventDefault();
            togglePassword();
        }, { passive: false });
    
        // 防止多次提交
        document.querySelector('form').addEventListener('submit', function(e) {
            const btn = e.target.querySelector('.signup-button');
            btn.disabled = true;
            btn.style.opacity = '0.7';
            setTimeout(() => {
                btn.disabled = false;
                btn.style.opacity = '1';
            }, 2000);
        });
    
        // 增强复选框点击
        document.querySelectorAll('.terms label').forEach(label => {
            label.addEventListener('click', function(e) {
                const checkbox = this.querySelector('input');
                checkbox.checked = !checkbox.checked;
            });
        });
    </script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js"></script>
</body>
</html>